package com.gonsin.gview.general.generator;

import com.gonsin.gview.general.po.EntityPo;
import com.gonsin.gview.general.po.TotalPo;
import com.gonsin.gview.general.utils.FreemarkerUtils;
import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import static com.gonsin.gview.general.Main.CONFIG;

public class AllGenerator implements IGenerator{

    private static List<IGenerator> generators = new ArrayList<>();
    static {
        generators.add(new ServiceGenerator());
        generators.add(new BeanGenerator());
        generators.add(new ControllerGenerator());
        generators.add(new MapperGenerator());
        generators.add(new PoGenerator());
        generators.add(new SearchPoGenerator());
        generators.add(new ServiceImplGenerator());


        generators.add(new TableViewGenerator());
    }

    @Override
    public void general(File targetPath, EntityPo po) {
        for(IGenerator generator : generators){
            generator.general(targetPath, po);
        }
    }
}
